import {
  ADD_COUNTER,
  ADD_TO_CART
} from './mutation-types'

export default {
   // 数量加一
   [ADD_COUNTER](state,payload){
    payload.count++
  },
  // 数组添加
  [ADD_TO_CART](state,payload) {
    payload.checked = true
    state.cartList.push(payload)
  }
}